//
//  LGTrainDetailController.m
//  XieHeHeartDisease
//
//  Created by 1234 on 2024/2/28.
//  训练详情

#import "LGTrainDetailController.h"
#import "LGTrainDetailItemView.h"
#import "LGTrainDetailActionView.h"
#define lineCount ((isPad==YES)?6:3)
#define itemW  ((Screen_W-viewPix(40))/lineCount)
#define itemH   viewPix(45)
@interface LGTrainDetailController ()
/**   */
@property (nonatomic , strong)UIView *baseView;
/**   */
@property (nonatomic , strong)UIScrollView *scrollView;
/**   */
@property (nonatomic , strong)UILabel *titleLabel;
/**   */
@property (nonatomic , strong)UILabel *timeLabel;
/**   */
@property (nonatomic , strong)UIImageView *headPic;
/**   */
@property (nonatomic , strong)UILabel *nameLabel;
/**   */
@property (nonatomic , strong)UIButton *checkBtn;
/**   */
@property (nonatomic , strong)UIView *lineView1;
/**   */
@property (nonatomic , strong)LGTrainDetailItemView *timeView;
/**   */
@property (nonatomic , strong)LGTrainDetailItemView *dzView;
/**   */
@property (nonatomic , strong)LGTrainDetailItemView *mbxlView;
/**   */
@property (nonatomic , strong)LGTrainDetailItemView *pjxlView;
/**   */
@property (nonatomic , strong)LGTrainDetailItemView *zdxlView;
/**   */
@property (nonatomic , strong)LGTrainDetailItemView *xlscView;
/**   */
@property (nonatomic , strong)LGTrainDetailActionView *actionView;
/**   */
@property (nonatomic , strong)UIButton *showButton;
/**   */
@property (nonatomic , strong)UIView *bottomView;
/**   */
@property (nonatomic , strong)UIView *lineView2;
/**   */
@property (nonatomic , strong)UIButton *heartTitle;
/**   */
@property (nonatomic , strong)UILabel *ydqTitle;
/**   */
@property (nonatomic , strong)UILabel *ydhTitle;
/**   */
@property (nonatomic , strong)UILabel *xyTitle;
@property (nonatomic , strong)UILabel *xyqLabel;
@property (nonatomic , strong)UILabel *xyhLabel;
/**   */
@property (nonatomic , strong)UILabel *xlTitle;
@property (nonatomic , strong)UILabel *xlqLabel;
@property (nonatomic , strong)UILabel *xlhLabel;
/**   */
@property (nonatomic , strong)UILabel *zzTitle;
@property (nonatomic , strong)UILabel *zzqLabel;
@property (nonatomic , strong)UILabel *zzhLabel;
/**   */
@property (nonatomic , strong)UIView *lineView3;
/**   */
@property (nonatomic , strong)UIButton *appraiseTitle;
/**   */
@property (nonatomic , strong)UILabel *plTitle;
@property (nonatomic , strong)UILabel *plLabel;
/**   */
@property (nonatomic , strong)UILabel *hxknTitle;
@property (nonatomic , strong)UILabel *hxknLabel;

@end

@implementation LGTrainDetailController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.fd_prefersNavigationBarHidden = YES;
    self.navigationView.title = @"运动记录";
    self.navigationView.backgroundColor = [UIColor colorWithString:@"#F3F7F8"];
    self.view.backgroundColor = [UIColor colorWithString:@"#F3F7F8"];
    [self.view addSubview:self.navigationView];
    [self createSubView];
    [self layoutSubViews];
    [self requestData];
}

-(void)requestData{
    [RequestUtil withPOST:@"/doctor/Sportsprescription.Prescription/trainResult" parameters:@{@"train_id":self.trainid} withSign:YES success:^(NSInteger code, NSString *message, id returnData) {
        if(code == 200){
            [self.headPic sd_setImageWithURL:[NSURL URLWithString:returnData[@"patient"][@"avatar_url"]]];
            self.nameLabel.text = LGNSString(returnData[@"patient"][@"nickname"]);
            self.titleLabel.text = LGNSString(returnData[@"title"]);
            self.timeView.valueStr = [self timeStringWith:[LGNSString(returnData[@"do_times"]) integerValue]];
            self.dzView.valueStr = LGNSString(returnData[@"action_count"]);
            self.mbxlView.valueStr = LGNSString(returnData[@"target_hr"]);
            self.pjxlView.valueStr = LGNSString(returnData[@"av_pulse"]);
            self.zdxlView.valueStr = LGNSString(returnData[@"max_pulse"]);
            self.xlscView.valueStr = [self timeString2With:[LGNSString(returnData[@"thr_time"]) integerValue]];
            self.actionView.actionArray = returnData[@"actions"];
            NSDictionary *recordDic = returnData[@"record"];
            self.timeLabel.text = LGNSString(recordDic[@"update_time"]);
            self.xyqLabel.text = [NSString stringWithFormat:@"%@/%@",recordDic[@"before_sbp"],recordDic[@"before_dbp"]];
            self.xyhLabel.text = [NSString stringWithFormat:@"%@/%@",recordDic[@"after_sbp"],recordDic[@"after_dbp"]];
            self.xlqLabel.text = LGNSString(recordDic[@"before_pulse"]);
            self.xlhLabel.text = LGNSString(recordDic[@"after_pulse"]);
            self.zzqLabel.text = LGNSString(recordDic[@"before_symptoms"]).length>0?LGNSString(recordDic[@"before_symptoms"]):@"无";
            self.zzhLabel.text = LGNSString(recordDic[@"after_symptoms"]).length>0?LGNSString(recordDic[@"after_symptoms"]):@"无";
            NSDictionary *plcdDic = @{@"6":@"安静、不费力",@"7":@"极其轻松",@"8":@"极其轻松",@"9":@"很轻松",@"10":@"轻松",@"11":@"轻松",@"12":@"有点用力",@"13":@"有点用力",@"14":@"有点用力",@"15":@"吃力",@"16":@"非常吃力",@"17":@"非常吃力",@"18":@"非常吃力",@"19":@"极其吃力",@"20":@"筋疲力竭",@"":@"无"};
            NSDictionary *hxknDic = @{@"0":@"无气喘",@"0.5":@"非常、非常轻微",@"1":@"非常轻微",@"2":@"轻微气喘",@"3":@"中等",@"4":@"一般严重",@"5":@"严重气喘",@"6":@"严重气喘",@"7":@"极其吃力",@"8":@"极其吃力",@"9":@"非常、非常严重",@"10":@"最为严重的程度",@"":@"无"};
            NSString *plcdScore = LGNSString(recordDic[@"after_lecd"]);
            NSString *hxknScore = LGNSString(recordDic[@"after_hxkncd"]);
            self.plLabel.text = (plcdScore.length>0)?[NSString stringWithFormat:@"%@分，%@",plcdScore,plcdDic[plcdScore]]:@"无";
            self.hxknLabel.text = (hxknScore.length>0)?[NSString stringWithFormat:@"%@分，%@",hxknScore,hxknDic[hxknScore]]:@"无";
        }
    } error:^(NSError *error) {
        
    }];
}
-(void)checkBtnAction{
    
}

-(void)showButtonAction:(UIButton *)sender{
    sender.selected = !sender.selected;
    if(sender.selected == YES){
        NSInteger count = (isPad == YES)?4:2;
        CGFloat actionH = viewPix(30);
        NSArray *tempArray = self.actionView.actionArray;
        CGFloat height = (tempArray.count/count)*actionH + viewPix(10);
        height = (tempArray.count%count>0)?height+actionH:height;
        self.actionView.frame = CGRectMake(viewPix(16), kMaxY(self.xlscView.frame)+viewPix(16), Screen_W-viewPix(32), height);
    }else{
        self.actionView.frame = CGRectMake(viewPix(16), kMaxY(self.xlscView.frame)+viewPix(16), Screen_W-viewPix(32), 0.01);
    }
    [self layoutSubViews];
}

-(NSString *)timeStringWith:(NSInteger)seconds{
    NSString *content = @"";
    NSInteger hour = seconds/3600;
    NSInteger minute = seconds/60;
    NSInteger second = seconds%60;
    
    if(hour>0){
        content = [NSString stringWithFormat:@"%.2ld:%.2ld:%.2ld",hour,minute,second];
    }else if (minute>0){
        content = [NSString stringWithFormat:@"%.2ld:%.2ld",minute,second];
    }else{
        content = [NSString stringWithFormat:@"00:%.2ld",second];
    }
    return content;
}

-(NSString *)timeString2With:(NSInteger)seconds{
    NSString *content = @"";
    NSInteger minute = seconds/60;
    NSInteger second = seconds%60;
    
    if (minute>0){
        content = [NSString stringWithFormat:@"%.2ld′%.2ld″",minute,second];
    }else{
        content = [NSString stringWithFormat:@"00′%.2ld″",second];
    }
    return content;
}

#pragma mark
#pragma mark ====> 创建控件
-(void)layoutSubViews{
    self.showButton.frame = CGRectMake((Screen_W-viewPix(120))/2.0, kMaxY(self.actionView.frame), viewPix(120), viewPix(40));
    self.lineView2.frame = CGRectMake(viewPix(18), kMaxY(self.showButton.frame), Screen_W-viewPix(36), 0.5);
    self.heartTitle.frame = CGRectMake(viewPix(18), kMaxY(self.lineView2.frame)+viewPix(18), viewPix(150), viewPix(24));
    self.ydqTitle.frame = CGRectMake(viewPix(158), kMaxY(self.lineView2.frame)+viewPix(48), (Screen_W-viewPix(158))/2.0, viewPix(20));
    self.ydhTitle.frame = CGRectMake(kMaxX(self.ydqTitle.frame), kMinY(self.ydqTitle.frame), (Screen_W-viewPix(158))/2.0, viewPix(20));
    self.xyTitle.frame = CGRectMake(viewPix(20), kMaxY(self.ydqTitle.frame)+viewPix(16), viewPix(130), viewPix(20));
    self.xyqLabel.frame = CGRectMake(kMinX(self.ydqTitle.frame), kMinY(self.xyTitle.frame)-viewPix(4), (Screen_W-viewPix(158))/2.0, viewPix(28));
    self.xyhLabel.frame = CGRectMake(kMinX(self.ydhTitle.frame), kMinY(self.xyqLabel.frame), (Screen_W-viewPix(158))/2.0, viewPix(28));
    self.xlTitle.frame = CGRectMake(viewPix(20), kMaxY(self.xyTitle.frame)+viewPix(36), viewPix(130), viewPix(20));
    self.xlqLabel.frame = CGRectMake(kMinX(self.ydqTitle.frame), kMinY(self.xlTitle.frame)-viewPix(4), (Screen_W-viewPix(158))/2.0, viewPix(28));
    self.xlhLabel.frame = CGRectMake(kMinX(self.ydhTitle.frame), kMinY(self.xlqLabel.frame), (Screen_W-viewPix(158))/2.0, viewPix(28));
    self.zzTitle.frame = CGRectMake(viewPix(20), kMaxY(self.xlTitle.frame)+viewPix(36), viewPix(130), viewPix(20));
    self.zzqLabel.frame = CGRectMake(kMinX(self.ydqTitle.frame), kMinY(self.zzTitle.frame)-viewPix(4), (Screen_W-viewPix(158))/2.0, viewPix(28));
    self.zzhLabel.frame = CGRectMake(kMinX(self.ydhTitle.frame), kMinY(self.zzqLabel.frame), (Screen_W-viewPix(158))/2.0, viewPix(28));
    self.lineView3.frame = CGRectMake(viewPix(18), kMaxY(self.zzhLabel.frame)+viewPix(12), Screen_W-viewPix(36), 0.5);
    self.appraiseTitle.frame = CGRectMake(viewPix(18), kMaxY(self.lineView3.frame)+viewPix(18), viewPix(150), viewPix(24));
    self.plTitle.frame = CGRectMake(kMinX(self.xyTitle.frame), kMaxY(self.appraiseTitle.frame)+viewPix(10), viewPix(130), viewPix(20));
    self.plLabel.frame = CGRectMake(kMinX(self.ydqTitle.frame), kMinY(self.plTitle.frame)-viewPix(4), Screen_W-viewPix(170), viewPix(28));
    self.hxknTitle.frame = CGRectMake(kMinX(self.xyTitle.frame), kMaxY(self.plTitle.frame)+viewPix(16), viewPix(130), viewPix(20));
    self.hxknLabel.frame = CGRectMake(kMinX(self.ydqTitle.frame), kMinY(self.hxknTitle.frame)-viewPix(4), Screen_W-viewPix(170), viewPix(28));
}


-(void)createSubView{
    [self.view addSubview:self.scrollView];
    [self.scrollView addSubview:self.baseView];
    [self.scrollView addSubview:self.headPic];
    [self.scrollView addSubview:self.nameLabel];
    [self.baseView addSubview:self.titleLabel];
    [self.baseView addSubview:self.timeLabel];
    [self.baseView addSubview:self.checkBtn];
    [self.baseView addSubview:self.lineView1];
    [self.baseView addSubview:self.timeView];
    [self.baseView addSubview:self.dzView];
    [self.baseView addSubview:self.mbxlView];
    [self.baseView addSubview:self.pjxlView];
    [self.baseView addSubview:self.zdxlView];
    [self.baseView addSubview:self.xlscView];
    [self.baseView addSubview:self.actionView];
    [self.baseView addSubview:self.showButton];
    [self.baseView addSubview:self.lineView2];
    [self.baseView addSubview:self.heartTitle];
    [self.baseView addSubview:self.ydqTitle];
    [self.baseView addSubview:self.ydhTitle];
    [self.baseView addSubview:self.xyTitle];
    [self.baseView addSubview:self.xyqLabel];
    [self.baseView addSubview:self.xyhLabel];
    [self.baseView addSubview:self.xlTitle];
    [self.baseView addSubview:self.xlqLabel];
    [self.baseView addSubview:self.xlhLabel];
    [self.baseView addSubview:self.zzTitle];
    [self.baseView addSubview:self.zzqLabel];
    [self.baseView addSubview:self.zzhLabel];
    [self.baseView addSubview:self.lineView3];
    [self.baseView addSubview:self.appraiseTitle];
    [self.baseView addSubview:self.plTitle];
    [self.baseView addSubview:self.plLabel];
    [self.baseView addSubview:self.hxknTitle];
    [self.baseView addSubview:self.hxknLabel];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.headPic.mas_bottom).offset(viewPix(5));
        make.left.equalTo(self.headPic).offset(-viewPix(10));
        make.right.equalTo(self.headPic).offset(viewPix(10));
    }];
}


-(UIScrollView *)scrollView{
    if(!_scrollView){
        _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, topBarHeight, Screen_W, Screen_H-topBarHeight)];
        _scrollView.contentSize = CGSizeMake(Screen_W, Screen_H);
        _scrollView.backgroundColor = [UIColor colorWithString:@"#F3F7F8"];
    }
    return _scrollView;
}

-(UIView *)baseView{
    if(!_baseView){
        _baseView = [[UIView alloc] initWithFrame:CGRectMake(0, viewPix(32), Screen_W, Screen_H)];
        _baseView.backgroundColor = [UIColor whiteColor];
    }
    return _baseView;
}

-(UILabel *)titleLabel{
    if(!_titleLabel){
        _titleLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFont(24) textAlignment:NSTextAlignmentLeft lines:1];
        _titleLabel.frame = CGRectMake(viewPix(18), viewPix(16), Screen_W-viewPix(80), viewPix(33));
    }
    return _titleLabel;
}

-(UILabel *)timeLabel{
    if(!_timeLabel){
        _timeLabel = [UILabel lableWithText:@"" colorString:@"#909399" textFont:LGFont(12) textAlignment:NSTextAlignmentLeft lines:1];
        _timeLabel.frame = CGRectMake(viewPix(18), kMaxY(self.titleLabel.frame)+viewPix(3), viewPix(200), viewPix(17));
    }
    return _timeLabel;
}

-(UIButton *)checkBtn{
    if(!_checkBtn){
        _checkBtn = [UIButton buttonWithTitle:@"查看AI智能分析结果" titleFont:LGFont(14) normalColor:@"#FFFFFF" selectColor:@"#FFFFFF"];
        _checkBtn.frame = CGRectMake(viewPix(18), kMaxY(self.timeLabel.frame)+viewPix(6), viewPix(150), viewPix(32));
        _checkBtn.backgroundColor = [UIColor colorWithString:kThemeColor];
        _checkBtn.cornerRidus = viewPix(16);
        [_checkBtn addTarget:self action:@selector(checkBtnAction) forControlEvents:UIControlEventTouchUpInside];
    }
    return _checkBtn;
}

-(UIImageView *)headPic{
    if(!_headPic){
        _headPic = [[UIImageView alloc]initWithFrame:CGRectMake(Screen_W-viewPix(56), viewPix(16), viewPix(40), viewPix(40))];
        _headPic.cornerRidus = viewPix(20);
    }
    return _headPic;
}

-(UILabel *)nameLabel{
    if(!_nameLabel){
        _nameLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(15, UIFontWeightMedium) textAlignment:NSTextAlignmentCenter lines:0];
    }
    return _nameLabel;
}

-(UIView *)lineView1{
    if(!_lineView1){
        _lineView1 = [[UIView alloc] initWithFrame:CGRectMake(viewPix(18), kMaxY(self.checkBtn.frame)+viewPix(12), Screen_W-viewPix(36), 0.5)];
        _lineView1.backgroundColor = [UIColor colorWithString:@"#E0E0E0"];
    }
    return _lineView1;
}

-(LGTrainDetailItemView *)timeView{
    if(!_timeView){
        _timeView = [[LGTrainDetailItemView alloc] initWithFrame:CGRectMake(viewPix(20), kMaxY(self.lineView1.frame)+viewPix(18), itemW, itemH)];
        _timeView.titleStr = @"用时";
    }
    return _timeView;
}

-(LGTrainDetailItemView *)dzView{
    if(!_dzView){
        _dzView = [[LGTrainDetailItemView alloc] initWithFrame:CGRectMake(kMaxX(self.timeView.frame), kMinY(self.timeView.frame), itemW, itemH)];
        _dzView.titleStr = @"动作";
    }
    return _dzView;
}

-(LGTrainDetailItemView *)mbxlView{
    if(!_mbxlView){
        _mbxlView = [[LGTrainDetailItemView alloc] initWithFrame:CGRectMake(kMaxX(self.dzView.frame), kMinY(self.timeView.frame), itemW, itemH)];
        _mbxlView.titleStr = @"目标心率";
    }
    return _mbxlView;
}

-(LGTrainDetailItemView *)pjxlView{
    if(!_pjxlView){
        CGFloat top = (isPad==YES)?kMinY(self.timeView.frame):(kMaxY(self.timeView.frame)+viewPix(20));
        CGFloat left = (isPad==YES)?kMaxX(self.mbxlView.frame):kMinX(self.timeView.frame);
        _pjxlView = [[LGTrainDetailItemView alloc] initWithFrame:CGRectMake(left, top, itemW, itemH)];
        _pjxlView.titleStr = @"平均心率";
    }
    return _pjxlView;
}

-(LGTrainDetailItemView *)zdxlView{
    if(!_zdxlView){
        _zdxlView = [[LGTrainDetailItemView alloc] initWithFrame:CGRectMake(kMaxX(self.pjxlView.frame), kMinY(self.pjxlView.frame), itemW, itemH)];
        _zdxlView.titleStr = @"最大心率";
    }
    return _zdxlView;
}

-(LGTrainDetailItemView *)xlscView{
    if(!_xlscView){
        _xlscView = [[LGTrainDetailItemView alloc] initWithFrame:CGRectMake(kMaxX(self.zdxlView.frame), kMinY(self.pjxlView.frame), itemW, itemH)];
        _xlscView.titleStr = @"心率达标时长";
    }
    return _xlscView;
}

-(LGTrainDetailActionView *)actionView{
    if(!_actionView){
        _actionView = [[LGTrainDetailActionView alloc] initWithFrame:CGRectMake(viewPix(16), kMaxY(self.xlscView.frame)+viewPix(16), Screen_W-viewPix(32), 0.01)];
    }
    return _actionView;
}

-(UIButton *)showButton{
    if(!_showButton){
        _showButton = [UIButton buttonWithTitle:@"展开详细数据" titleFont:LGFont(12) textColor:@"#909399" imageName:@"grayTipDown"];
        _showButton.bounds = CGRectMake(0, 0, viewPix(120), viewPix(40));
        [_showButton setImage:[UIImage imageNamed:@"grayTipUp"] forState:UIControlStateSelected];
        [_showButton setTitle:@"收起详细数据" forState:UIControlStateSelected];
        [_showButton addTarget:self action:@selector(showButtonAction:) forControlEvents:UIControlEventTouchUpInside];
        [_showButton setButtonInsetsStyle:LGButtonInsetsStyleRight marginSpace:5];
    }
    return _showButton;
}


-(UIView *)lineView2{
    if(!_lineView2){
        _lineView2 = [[UIView alloc] init];
        _lineView2.backgroundColor = [UIColor colorWithString:@"#E0E0E0"];
    }
    return _lineView2;
}

-(UIButton *)heartTitle{
    if(!_heartTitle){
        _heartTitle = [UIButton buttonWithTitle:@"血压心率" titleFont:LGFontWeight(15, UIFontWeightMedium) textColor:@"#282828" imageName:@"运动记录-血压心率"];
        _heartTitle.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
        _heartTitle.titleEdgeInsets = UIEdgeInsetsMake(0, viewPix(5), 0, 0);
    }
    return _heartTitle;
}



-(UILabel *)ydqTitle{
    if(!_ydqTitle){
        _ydqTitle = [UILabel lableWithText:@"运动前" colorString:@"#606266" textFont:LGFont(12) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _ydqTitle;
}

-(UILabel *)ydhTitle{
    if(!_ydhTitle){
        _ydhTitle = [UILabel lableWithText:@"运动后" colorString:@"#606266" textFont:LGFont(12) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _ydhTitle;
}

-(UILabel *)xyTitle{
    if(!_xyTitle){
        _xyTitle = [UILabel lableWithText:@"" colorString:@"#606266" textFont:LGFont(12) textAlignment:NSTextAlignmentLeft lines:1];
        _xyTitle.attributedText = [@"血压(mmHg)" attributeString:@{NSForegroundColorAttributeName:[UIColor colorWithString:@"#909399"]} range:NSMakeRange(2, 6)];
    }
    return _xyTitle;
}

-(UILabel *)xyqLabel{
    if(!_xyqLabel){
        _xyqLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(20, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _xyqLabel;
}

-(UILabel *)xyhLabel{
    if(!_xyhLabel){
        _xyhLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(20, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _xyhLabel;
}


-(UILabel *)xlTitle{
    if(!_xlTitle){
        _xlTitle = [UILabel lableWithText:@"" colorString:@"#606266" textFont:LGFont(12) textAlignment:NSTextAlignmentLeft lines:1];
        _xlTitle.attributedText = [@"心率(次/分钟)" attributeString:@{NSForegroundColorAttributeName:[UIColor colorWithString:@"#909399"]} range:NSMakeRange(2, 6)];
    }
    return _xlTitle;
}

-(UILabel *)xlqLabel{
    if(!_xlqLabel){
        _xlqLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(20, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _xlqLabel;
}

-(UILabel *)xlhLabel{
    if(!_xlhLabel){
        _xlhLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(20, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _xlhLabel;
}

-(UILabel *)zzTitle{
    if(!_zzTitle){
        _zzTitle = [UILabel lableWithText:@"症状" colorString:@"#606266" textFont:LGFont(12) textAlignment:NSTextAlignmentLeft lines:1];
        
    }
    return _zzTitle;
}

-(UILabel *)zzqLabel{
    if(!_zzqLabel){
        _zzqLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(20, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _zzqLabel;
}

-(UILabel *)zzhLabel{
    if(!_zzhLabel){
        _zzhLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(20, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:2];
    }
    return _zzhLabel;
}


-(UIView *)lineView3{
    if(!_lineView3){
        _lineView3 = [[UIView alloc] init];
        _lineView3.backgroundColor = [UIColor colorWithString:@"#E0E0E0"];
    }
    return _lineView3;
}

-(UIButton *)appraiseTitle{
    if(!_appraiseTitle){
        _appraiseTitle = [UIButton buttonWithTitle:@"自我评价" titleFont:LGFontWeight(15, UIFontWeightMedium) textColor:@"#282828" imageName:@"运动记录-自我评价"];
        _appraiseTitle.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
        _appraiseTitle.titleEdgeInsets = UIEdgeInsetsMake(0, viewPix(5), 0, 0);
    }
    return _appraiseTitle;
}

-(UILabel *)plTitle{
    if(!_plTitle){
        _plTitle = [UILabel lableWithText:@"劳累程度" colorString:@"#606266" textFont:LGFont(12) textAlignment:NSTextAlignmentLeft lines:1];
        _plTitle.frame = CGRectMake(viewPix(20), kMaxY(self.lineView3.frame)+viewPix(16), viewPix(130), viewPix(20));
    }
    return _plTitle;
}

-(UILabel *)plLabel{
    if(!_plLabel){
        _plLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(20, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
        
    }
    return _plLabel;
}

-(UILabel *)hxknTitle{
    if(!_hxknTitle){
        _hxknTitle = [UILabel lableWithText:@"呼吸困难程度" colorString:@"#606266" textFont:LGFont(12) textAlignment:NSTextAlignmentLeft lines:1];
        
    }
    return _hxknTitle;
}

-(UILabel *)hxknLabel{
    if(!_hxknLabel){
        _hxknLabel = [UILabel lableWithText:@"" colorString:@"#282828" textFont:LGFontWeight(20, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
        
    }
    return _hxknLabel;
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
